Skip to content

Comments

exeptions.wh1 request#2

Open
lbrdev wants to merge 1 commit intoChangeRequest:masterfrom
lbrdev:master
Open

exeptions.wh1 request#2
lbrdev wants to merge 1 commit intoChangeRequest:masterfrom
lbrdev:master

Conversation

@lbrdev
Copy link

@lbrdev lbrdev commented Jan 10, 2017

to check 1

@didva didva self-assigned this Jan 10, 2017
Copy link
Contributor

@didva didva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Go on with other tasks.
The main idea of bank account is correct.

public static void main(String[] args) {
BankAccountImpl bankAccount1 = new BankAccountImpl();

bankAccount1.balance = 15;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please always use getters/setters. Direct access to fields is really bad practice.


@Override
public void setRate(double rate) {
rate = newRate;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks strange and for sure won't work.

double balance;
double rate;
int accountNumber;
double sum;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make all fields private and delete sum and newRate fields.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants